<?php
namespace app\common\model;
use x\Xbase;
class GoodsSpec extends Xbase
{
    /**
     *获取分类下规格列表
     */
    public function catSpecList($cat_id){
        $info = $this->db->find("goods_cat",$cat_id);
        if(!$info['goods_spec_ids']){
            $spec_list = [];
        }else{
            $sql = "select * from goods_spec where id in (".$info['goods_spec_ids'].")";
            $spec_list = $this->db->query($sql);
        }
        return $spec_list;
    }
}
